feat(dns): add support for hickory-resolver#64
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds an optional DNS resolver implementation based on hickory-resolver, integrating it into cyper via a new cyper-hickory workspace crate and a hickory-dns feature flag (enabling DoT/DoH support).
Changes:
- Added new
cyper-hickorycrate implementing hickory runtime/connection provider adapters forcompio, including TLS (DoT) and HTTPS (DoH) transports. - Integrated an optional
hickory-dnsresolver intocyper’sClientBuilder, with an opt-outno_hickory_dns()method and updated error typing/deps. - Updated tests and blocking backend runtime usage to align with compio runtime requirements.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| Cargo.toml | Adds cyper-hickory to the workspace and centralizes shared deps (http, http-body-util, hickory crates). |
| cyper/Cargo.toml | Adds optional hickory-dns feature and optional deps (cyper-hickory, hickory-*), plus workspace dep alignment. |
| cyper/src/client.rs | Adds hickory_dns builder toggle, defaulting on when feature is enabled, and threads resolver into connectors/HTTP3 client. |
| cyper/src/lib.rs | Adds a hickory-related error variant behind hickory-dns. |
| cyper/src/nyquest/blocking.rs | Ensures client creation happens inside a compio runtime via runtime.enter(...). |
| cyper/src/resolve.rs | Introduces HickoryResolver behind hickory-dns implementing Resolve. |
| cyper/tests/client.rs | Converts two JSON tests to #[compio::test] async fn to run under the compio runtime. |
| cyper-hickory/Cargo.toml | Defines the new crate, optional features for tls/https, and required deps for DoH plumbing. |
| cyper-hickory/src/lib.rs | Implements the core hickory runtime provider + connection provider adapter for compio. |
| cyper-hickory/src/tls.rs | Adds TLS (DoT) connection setup for hickory exchanges. |
| cyper-hickory/src/https.rs | Adds HTTPS (DoH) connection setup using hyper + cyper-core stream integration. |
| cyper-hickory/tests/resolve.rs | Adds basic resolution tests (but currently not asserting transport selection for tls/https). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #60
The hickory crates assume strongly that tokio exists. This PR adds support for DoT and DoH, but without DoQ or DoH3.